package com.iotechn.unimall.data.privateMapper;

import com.iotechn.unimall.data.domain.UserDO;
import com.iotechn.unimall.data.entity.BookDo;
import com.iotechn.unimall.data.entity.StudentDo;
import com.iotechn.unimall.data.mapper.IMapper;
import com.iotechn.unimall.data.model.KVModel;
import com.iotechn.unimall.data.model.Page;

import java.util.List;

public interface StudentMapper extends IMapper<StudentDo> {

    /**
     * 查询用户专业
     * @return
     */
    List<KVModel<String, Long>> selectMajorStatistics();

    /**
     * 查询用户年龄
     * @return
     */
    List<KVModel<String, Long>> selectAgeStatistics();

    /**
     * 查询用户list
     * @param div
     * @return
     */
    Page<StudentDo> getStudentList(Page<UserDO> div);

    /**
     * 查询用户书架
     * @param id
     * @return
     */
    List<BookDo> getBookshelfByStuId(Integer id);
}
